package com.crm.controller;

import com.crm.entity.Dept;
import com.crm.result.Result;
import com.crm.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/system/")
public class DeptController {
    @Autowired
    private IDeptService deptService;
    /**
     * 部门管理,新增
     */
    @GetMapping("/dept/list")
    public Result<Dept> save(){
        Dept dept = deptService.savedept();
        return Result.success(dept);
    }
}
